package com.taobao.wolfwolf.hibernate.pojo;

/**
 * RibbonTypeId entity. @author MyEclipse Persistence Tools
 */

public class RibbonTypeId implements java.io.Serializable {

	// Fields

	private Ribbon ribbon;
	private Type type;

	// Constructors

	/** default constructor */
	public RibbonTypeId() {
	}

	/** full constructor */
	public RibbonTypeId(Ribbon ribbon, Type type) {
		this.ribbon = ribbon;
		this.type = type;
	}

	// Property accessors

	public Ribbon getRibbon() {
		return this.ribbon;
	}

	public void setRibbon(Ribbon ribbon) {
		this.ribbon = ribbon;
	}

	public Type getType() {
		return this.type;
	}

	public void setType(Type type) {
		this.type = type;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof RibbonTypeId))
			return false;
		RibbonTypeId castOther = (RibbonTypeId) other;

		return ((this.getRibbon() == castOther.getRibbon()) || (this
				.getRibbon() != null && castOther.getRibbon() != null && this
				.getRibbon().equals(castOther.getRibbon())))
				&& ((this.getType() == castOther.getType()) || (this.getType() != null
						&& castOther.getType() != null && this.getType()
						.equals(castOther.getType())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getRibbon() == null ? 0 : this.getRibbon().hashCode());
		result = 37 * result
				+ (getType() == null ? 0 : this.getType().hashCode());
		return result;
	}

}